<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件监听案例</title>
</head>
<body>
    <img src="../resource/daolu1.jpeg" alt="" height="50px" id="ii">
    <br>
    <input type="button" name="on" id="" onclick="on()" value="1">
    <input type="button" name="doen" id="" onclick="down()" value="2">
    <br><br>
    <input type="text" name="ageInput" id="ageInput" onblur="big()" onfocus="small()" id="www"><br><br>
    <input type="checkbox" name="11" id="" value="1" >足球
    <input type="checkbox" name="11" id="" value="2" >篮球
    <input type="checkbox" name="11" id="" value="3" >排球<br>
    <input type="button" name="check" id="" onclick="on1()" value="正">
    <input type="button" name="nocheack" id="" onclick="down1()" value="饭">


</body>
<script>
    function on(){
        var imgg = document.getElementById("ii")
        imgg.src = "../resource/news_logo.png"
        console.log("来暖气")
    }
    function down(){
        var imgg = document.getElementById("ii")
        imgg.src = "../resource/daolu1.jpeg"
        console.log("没暖气")
    }
    function big(){
        var ageInput = document.getElementById("ageInput");
        ageInput.value = ageInput.value.toUpperCase();
    }
    function small(){
        var ageInput = document.getElementById("ageInput");
        ageInput.value = ageInput.value.toLowerCase();
    }
    function on1(){
        var x = document.getElementsByName("11")
        for(let i = 0;i<x.length;i++){
            x[i].checked = true
        }

    }
    function down1(){
        var x1 = document.getElementsByName("11")
        for(let i = 0;i<x1.length;i++){
            x1[i].checked = false
        }
    }
    
</script>
</html>